“Program verification” 指程序验证:使用数学推理、逻辑方法或自动化工具,证明一个程序满足其规格说明(specification),即在给定前提下程序的行为是正确的。常见关注点包括:正确性(correctness)、安全性(safety)、终止性(termination)等。(该术语在不同语境下也可涵盖形式化验证、模型检测、定理证明等相关方法。)
/ˈproʊɡræm ˌvɛrɪfɪˈkeɪʃən/
Program verification can find bugs before the software is released.
程序验证可以在软件发布前发现缺陷。
Using Hoare logic and loop invariants, the team performed program verification to prove that the sorting algorithm always returns a correctly ordered array.
团队使用霍尔逻辑与循环不变式进行程序验证,以证明该排序算法总能返回正确有序的数组。
“Program” 源自希腊语 programma(意为“公开写下的东西、书面命令/清单”),经拉丁语与法语演变,后来在现代计算机语境中指“程序”。“Verification” 来自拉丁语 verus(真实的)+ facere(做、使),合起来有“使其为真、核实”的含义;因此 “program verification” 字面上就是“核实程序为真/为正确”。